.class Lcom/estrongs/android/taskmanager/widget/a;
.super Ljava/util/TimerTask;


# instance fields
.field final synthetic a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

.field private b:Landroid/appwidget/AppWidgetManager;

.field private c:Landroid/content/Context;

.field private d:I


# direct methods
.method public constructor <init>(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;Landroid/content/Context;Landroid/appwidget/AppWidgetManager;I)V
    .locals 0

    iput-object p1, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-direct {p0}, Ljava/util/TimerTask;-><init>()V

    iput-object p3, p0, Lcom/estrongs/android/taskmanager/widget/a;->b:Landroid/appwidget/AppWidgetManager;

    iput-object p2, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    iput p4, p0, Lcom/estrongs/android/taskmanager/widget/a;->d:I

    return-void
.end method


# virtual methods
.method public run()V
    .locals 3

    const/4 v1, 0x3

    sget-boolean v0, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->a:Z

    if-nez v0, :cond_6

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/ht;->e(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/ht;->i(Landroid/content/Context;)I

    move-result v0

    if-nez v0, :cond_4

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    const/4 v1, 0x2

    invoke-static {v0, v1}, Lcom/estrongs/android/taskmanager/TaskManager;->a(Landroid/content/Context;I)V

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/widget/a;->b:Landroid/appwidget/AppWidgetManager;

    iget v2, p0, Lcom/estrongs/android/taskmanager/widget/a;->d:I

    invoke-static {v0, v1, v2}, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->a(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;I)V

    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;)Ljava/util/Timer;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;)Ljava/util/Timer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    :cond_2
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-virtual {v0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->stopSelf()V

    :cond_3
    :goto_1
    return-void

    :cond_4
    if-ne v0, v1, :cond_5

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/estrongs/android/taskmanager/TaskManager;->a(Landroid/content/Context;I)V

    goto :goto_0

    :cond_5
    const/4 v1, 0x4

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/estrongs/android/taskmanager/TaskManager;->a(Landroid/content/Context;I)V

    goto :goto_0

    :cond_6
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    iget v1, p0, Lcom/estrongs/android/taskmanager/widget/a;->d:I

    invoke-static {v0, v1}, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->a(Landroid/content/Context;I)Z

    move-result v0

    if-nez v0, :cond_7

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->d(Landroid/content/Context;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->a(Lcom/estrongs/android/taskmanager/widget/TmUpdateService;)Ljava/util/Timer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->a:Lcom/estrongs/android/taskmanager/widget/TmUpdateService;

    invoke-virtual {v0}, Lcom/estrongs/android/taskmanager/widget/TmUpdateService;->stopSelf()V

    goto :goto_1

    :cond_7
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/widget/a;->c:Landroid/content/Context;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/widget/a;->b:Landroid/appwidget/AppWidgetManager;

    iget v2, p0, Lcom/estrongs/android/taskmanager/widget/a;->d:I

    invoke-static {v0, v1, v2}, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->a(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;I)V

    goto :goto_1
.end method
